<template>
  <div class="bank-score">
    <div class="title">
      <h2>网点评分</h2>
      <div class="detail-btn" @click="$emit('onOpenBankScoreDetail')">
        <span>详情</span>
        <svg-icon name="triangle-right" size="12"></svg-icon>
      </div>
    </div>
    <div class="bank-rank-list">
      <p>支行网点排名</p>
      <div>
        <span>2</span>/
        <span>17家</span>
      </div>
    </div>
    <div class="bank-rank-list">
      <p>分行网点排名</p>
      <div>
        <span>8</span>/
        <span>45家</span>
      </div>
    </div>
    <div class="chart-wrapper">
      <slot></slot>
    </div>
    <div class="chart-legend"></div>
    <div class="general-score">
      综合评分：<span>8.1</span>
    </div>
  </div>
</template>

<script>

export default {

}
</script>

<style scoped lang="less">
.bank-score {
  padding: 0 16px;
  .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    h2 {
      color: #FFD788;
      font-weight: 500;
      line-height: 1.5;
    }
    .detail-btn {
      color: rgba(255, 255, 255, .6);
      display: flex;
      align-items: center;
      cursor: pointer;
      span {
        margin-right: 2px;
      }
    }
  }
  .bank-rank-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 32px;
    border: 1px  solid #BCE8FF;
    border-radius: 4px;
    margin-bottom: 6px;
    padding: 0 16px;
    color: #fff;
    font-size: 12px;
    span {
      &:first-child {
        font-size: 16px;
        color: #FFD788;
      }
    }
  }
  .chart-wrapper {
    padding: 10px 0;
    height: 208px;
    box-sizing: border-box;
  }
  .chart-legend {
    height: 12px;
    margin-bottom: 10px;
    background: url('../assets/images/bank-info-chart-legend.svg') no-repeat center / contain;
  }
  .general-score {
    width: 100px;
    height: 24px;
    border: 1px solid rgba(187, 187, 187, 1);
    background-color: rgba(58, 104, 174, .3);
    border-radius: 2px;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    color: #fff;
    margin: 0 auto;
    span {
      color: rgba(29, 213, 134, 1);
    }
  }
}
</style>
